﻿<basics:ChildWindow x:Class="BingVis.SilverlightClient.CompressFileWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:cal="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    Width="400" Height="300">
    <Grid x:Name="ChildRoot" Background="Transparent" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Margin="5">
            <TextBlock FontSize="14" Text="Compress a Fare File to your local machine" FontWeight="Bold" Margin="5 10"/>
            <TextBlock Width="350" Text="Select a Fare Gate file then click OK to choose where to save the compressed file." TextWrapping="Wrap"/>
        </StackPanel>
        <Border Grid.Row="1"
            Padding="5">
            <StackPanel>
                <TextBlock Text="Fare File" FontWeight="Bold" Margin="0 3" />
                <Button 
                    x:Name="btnSelect"
                    Width="100"
                    HorizontalAlignment="Left"
                    cal:Click.Command="{Binding ShowFareFileSelector}"
                    Content="Select Fare File" />
                <!--<TextBlock Text="Compressed File" FontWeight="Bold" Margin="0 9 0 3" />-->
                <!--<Button
                    Width="100"
                    HorizontalAlignment="Left"
                    cal:Click.Command="{Binding ShowCompressedFareFileSaver}"
                    Content="Select Compress File To Save To"/>-->
                <Border
                    Margin="0 25 0 10"
                    Visibility="Collapsed"
                    x:Name="ProgressHolder">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Progress..." FontSize="13" FontWeight="Bold" Margin="10 0 0 10" />
                            <TextBlock Text=" ("/>
                            <TextBlock Text="{Binding ItemsProcessed}" FontWeight="Bold"/>
                            <TextBlock Text=" of "/>
                            <TextBlock Text="{Binding TotalItems}" FontWeight="Bold"/>
                            <TextBlock Text=")"/>
                        </StackPanel>
                        <ProgressBar
                            Maximum="{Binding TotalItems}"
                            Minimum="0"
                            Height="25"         
                            IsIndeterminate="False"                   
                            Value="{Binding ItemsProcessed}"                            
                            HorizontalAlignment="Stretch"
                            />
                    </StackPanel>
                </Border>
                    
            </StackPanel>
        </Border>
        <Button VerticalAlignment="Bottom" x:Name="btnCancel" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0 12 0 0" Grid.Row="2"/>
        <Button VerticalAlignment="Bottom" x:Name="btnOK" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0 12 79 0" Grid.Row="2"/>
    </Grid>
</basics:ChildWindow>
